﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel;
using HelloMinasan.Resources;

namespace HelloMinasan.Web.ViewModels
{
    public class ForgotPasswordModel
    {
        public ForgotPasswordModel()
        {
            ReturnUrl = "/";
        }

        [Display(Name = "Common_YourEmailAddress", ResourceType = typeof(Resource))]
        [Required(ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "HomeLogin_EmailEmpty")]
        [StringLength(50, ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "InValidMaxSize")]
        [RegularExpression(@"^[a-zA-Z][\w\.-]*[a-zA-Z0-9]@[a-zA-Z0-9][\w\.-]*[a-zA-Z0-9]\.[a-zA-Z][a-zA-Z\.]*[a-zA-Z]$", ErrorMessageResourceType = typeof(Resources.Resource), ErrorMessageResourceName = "EmailInvalid")]
        public string UsernameOrEmail { get; set; }

        public string ReturnUrl { get; set; }
    }
}